package com.leapp.sk.sever.login

import com.example.util.ObjectProcessingUtil
import com.leapp.sk.bean.UPFileEntity
import com.leapp.sk.bean.response.login.UPFileResponseEntity

/**
 * 完善用户信息
 * @author  chaohaipeng  on 2018/8/16.
 */
class PrefectUserInfoSever {
    private object mHolder {
        val instance = PrefectUserInfoSever()
    }
    companion object {
        fun getInstance(): PrefectUserInfoSever {
            return mHolder.instance
        }
    }
    /**
     * 获取文件地址
     */
    fun getUrl(obj: UPFileResponseEntity?): String?{
        val upFile: UPFileEntity =ObjectProcessingUtil.objMandatoryConversionClass(obj?.data, UPFileEntity::class.java)
        return upFile?.url
    }

}